regex: match white-spaces that do not enclosed in []

Posted by powerboy on Stack Overflow See other posts from Stack Overflow or by powerboy
Published on 2010-05-23T18:27:22Z Indexed on 2010/05/23 18:30 UTC
Read the original article Hit count: 373

Filed under:

For example, for this string,

div.img-wrapper img[title="Hello world"]

I want to match the first space but not the second space (which is enclosed in []). What is the regex?

© Stack Overflow or respective owner

Related posts about regex